<?

$page=$model;
	if($model->id==0){
		$hidden['parent_id']=$this->input->get('parent_id');
		$hidden['position']=1000;
		
		$page->visible=1;
	}else{
		$hidden['type']="page";
	}
?>

<div class='contentheader'>Page Formular</div>
<?

echo $formheader;

echo form::open(NULL, array(), $hidden);
echo form::open_fieldset();


echo myform::inputfield('title', 'Title', $page->title);
echo myform::inputfield('shortname', 'Shortname', $page->shortname);


$templates=ORM::factory('pagetemplate');
$tlist=$templates->orderby('title','asc')->find_all()->select_list('id', 'title');

echo myform::dropdown('pagetemplate_id', 'Template',  $tlist, $page->pagetemplate->id);
echo myform::inputfield('displayhook', 'Display Hook', $page->displayhook);
echo myform::inputfield('speciallink', 'Special Link', $page->speciallink);

echo myform::checkbox('visible', 'Sichtbar', $page->visible);

echo form::close_fieldset();

echo myform::submit();

echo form::close();
?>